1. Technical Field
The present invention relates generally to an improved data processing system and in particular to a method and apparatus for presenting an image in a data processing system. Still more particularly, the present invention provides a method and apparatus for generating an image at a server computer and presenting the image at a client computer.
2. Description of Related Art
X Window System is a windowing system, which runs under UNIX and all major operating systems. X Window System is also called “X Windows” and “X”. X Windows lets users run applications on other computers in the network and view the output on their own screen. X Windows generates a rudimentary window that can be enhanced with graphical user interfaces (GUIs), but does not require applications to conform to a GUI standard. The window manager component of the GUI allows multiple resizable, relocatable X windows to be viewed on a screen at the same time.
X Windows software resides in the computer that performs the processing, such as a server machine, and X Windows software resides in the computer that displays the window, such as on a client machine.
Java is used with X Windows to provide applications to users over a network. Java has become a popular and prevalent language because Java allows for a program or application to run on many different types of platforms without having to created a version of the program or application for the native language used by each platform. Instead, a Java virtual machine (JVM) is used to provide multiplatform support. An application or program created using Java contains a set of bytecodes, which is run on all of the different types of platforms. The JVM executes bytecodes to avoid requiring the program or application to be in a form of native instructions normally used at a particular platform.
In using Java with X Windows, a default mode is present in which Java draws strings using thirty two or eight bits for each pixel. Normally, XGetImage and XPutImage calls are made to X Windows to obtain an image, the application integrates the new text into the original image, and the final image is displayed with a XPutImage call. XPutImage is a call used to combine an image with a rectangle of a drawable for immediate or later display. Windows and pixmaps may be used as destinations in graphics operations in the X windows system, collectively they are known as drawables. A pixmap is an example of a drawable and is an off-screen resource that is used for various operations, for example, defining cursors as tiling patterns or as the source for certain raster operations. Most graphics requests can operate either on a window or on a pixmap. A bitmap is a single bit-plane pixmap. XGetImage is used to return a pointer to a data structure, which contains the contents of a specified rectangle of a drawable in a specified format.
With respect to text, it would be desirable to draw one bit per pixel images with a transparent mode in which pixels in the background color are not drawn to the image. This feature allows for reduction in the amount of data required to be transferred between a client and a server. Also, delays in reading data from a client, transferring the data to the server, and delivering the data to the server applications would be reduced. X Windows does not directly support such a function or process.
Therefore, it would be advantageous to have an improved method and apparatus for drawing or displaying text images.